﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BSCMFF.Core.DataAccessLayer
{
    public partial class KPI_Progress
    {
        private double progress;
        private double performance;

        public double Progress
        {
            get
            {
                return (Current_Value - Start_Value) / (Target_Value - Start_Value) * 100;
            }
        }

        public double Performance
        {
            get
            {
                //if (Current_Value == null)
                //{
                //    Current_Value = Start_Value;
                //}
                //if (Min == null)
                //{
                //    Min = Start_Value;
                //}

                //if (Max == null)
                //{
                //    Max = Target_Value;
                //}


                return (Current_Value - Min) / (Max - Min) * 100;
            }
        }
    }
}
